<template>
  <group>
    <cell v-for="menu in menus" :key="menu.menucode" v-if="menu.isshow" :title="menu.name" :link="name2path[menu.menucode]"></cell>
    <foot-guide :select="2"></foot-guide>
  </group>
</template>
<script>
import { Group, Cell } from "vux";
import footGuide from "../../components/footer/footGuide";

export default {
  data() {
    return {
      menus: [],
      name2path: {
        addagent: "createAgent",
        agentlist: "agentList",
        datastatistics: "dataStatistics",
        gamestatistics: "gameStatistics",
        bindagent: "bindAgent",
        unbundling: "unBindAgent"
      }
    };
  },
  components: {
    Group,
    Cell,
    footGuide
  },
  created() {
    this.apiService.index.getagentmenu().then(res => {
      this.menus = res.data.agentmenulist;
    });
  }
};
</script>

